package com.googlecode.restitory.api.gae;

import java.util.List;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

public class TxJsonServiceAdapter implements TxJsonService {

	private TxJsonService service;

	public TxJsonServiceAdapter() {

	}

	public TxJsonServiceAdapter(TxJsonService service) {
		this.service = service;
	}

	protected TxJsonService getService() {
		return service;
	}

	protected void setService(TxJsonService service) {
		this.service = service;
	}

	public void commit() {
		service.commit();
	}

	public void begin() {
		service.begin();
	}

	public String put(JsonObject obj) {
		return service.put(obj);
	}

	public boolean isActive() {
		return service.isActive();
	}

	public void rollback() {
		service.rollback();
	}

	public String post(JsonObject obj) {
		return service.post(obj);
	}

	public JsonObject get(String id) {
		return service.get(id);
	}

	public void delete(String id) {
		service.delete(id);
	}

	public void delete(String id, Long rev) {
		service.delete(id, rev);
	}

	public JsonArray query(JsonObject query) {
		return service.query(query);
	}

	public Long count(JsonObject query) {
		return service.count(query);
	}

	public JsonArray getAll(Iterable<String> paths) {
		return service.getAll(paths);
	}

	public JsonArray getAll(JsonArray paths) {
		return service.getAll(paths);
	}

	public JsonArray putAll(Iterable<JsonObject> jsons) {
		return service.putAll(jsons);
	}

	public JsonArray putAll(JsonArray jsons) {
		return service.putAll(jsons);
	}

	public JsonArray postAll(Iterable<JsonObject> jsons) {
		return service.postAll(jsons);
	}

	public JsonArray postAll(JsonArray jsons) {
		return service.postAll(jsons);
	}

	public void deleteAll(Iterable<String> paths) {
		service.deleteAll(paths);
	}

	public void deleteAll(JsonArray paths) {
		service.deleteAll(paths);
	}

	public String generatePath(String name) {
		return service.generatePath(name);
	}

	public List<String> generatePaths(String name, int size) {
		return service.generatePaths(name, size);
	}

	@Override
	public JsonObject cursor(JsonObject query) {
		return service.cursor(query);
	}

}
